package com.lagou.goods;

import com.github.pagehelper.PageInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

/**
 * @description: 商品微服务
 **/
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.lagou.goods.mapper")
public class GoodsApplication {

    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class, args);
    }

    /**
     * 分页插件
     * @return
     */
    @Bean
    public PageInterceptor pageInterceptor(){
        return new PageInterceptor();
    }
}
